interface Room{
  spawnQueueAdd:(role:string,body:BodyPartConstant[],memory?:CreepMemory,priority?:boolean) => void;
  spawnQueueRemove:(creep:{ id:number,role:string,body:BodyPartConstant[],memory:CreepMemory,priority?:boolean }) => void;
  spawnQueueGetRole:(role:string,filterFunc:(creep:{ id:number,role:string,body:BodyPartConstant[],memory:CreepMemory,priority?:boolean }) => boolean) => Array<{ id:number,role:string,body:BodyPartConstant[],memory:CreepMemory,priority?:boolean }>;
  spawn:()=>StructureSpawn | null;
  calculateCreepBody:(partRatios: { [part: string]: number },energyCapacityAvailable?:number) => BodyPartConstant[];
  my:()=>boolean;
}

interface Creep {
  myMove: (target: RoomPosition, range?: number) => void,
  refuseCross: (direction: DirectionConstant) => boolean,
  run:() => void,
  go:(target: RoomPosition| { pos: RoomPosition }) => CreepMoveReturnCode | -5 | -10,
  moving: boolean,
  findClosestPath:(end:RoomPosition)=>RoomPosition[] | null;
}